package com.happy.service.impl;

import com.happy.dao.UserDao;
import com.happy.pojo.User;
import com.happy.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author: happy
 * @Date: 2021/9/21 21:47
 * @Version: 1.0
 */
@Transactional
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserDao userDao;

    /**
     * 根据用户名查询用户信息
     *
     * @param username
     * @return
     */
    @Override
    public User findByUserName(String username) {
        return userDao.selectByUserName(username);
    }
}
